package com.hkt.springboot.api;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

@RestController
public class CustomerController {

    @Autowired
    private HelloFeign helloFeign;

    @Value("${username}")
    private String username;
   @GetMapping("/hello")
    public String hello(@RequestParam("name") String name) {


       return  helloFeign.hello(name+",username="+username+ "!");
    }
}
